From e4c8d0db290c0d101f0ee3163aaf98008f60b270 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Wed, 12 Oct 2005 09:31:53 +0100 Subject: [PATCH] Fix PAE overflow in xc_linux_build. Signed-off-by: srparish@us.ibm.com --- tools/libxc/xc_linux_build.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/libxc/xc_linux_build.c b/tools/libxc/xc_linux_build.c index 2c984bf5ea..3b0f28676f 100644 --- a/tools/libxc/xc_linux_build.c +++ b/tools/libxc/xc_linux_build.c @@ -500,11 +500,11 @@ static int setup_guest(int xc_handle, _p(dsi.v_start), _p(v_end)); printf(" ENTRY ADDRESS: %p\n", _p(dsi.v_kernentry)); - if ( (v_end - dsi.v_start) > (nr_pages * PAGE_SIZE) ) + if ( ((v_end - dsi.v_start)>>PAGE_SHIFT) > nr_pages ) { - PERROR("Initial guest OS requires too much space\n" + printf("Initial guest OS requires too much space\n" "(%luMB is greater than %luMB limit)\n", - (v_end-dsi.v_start)>>20, (nr_pages<>20); + (v_end-dsi.v_start)>>20, nr_pages>>(20-PAGE_SHIFT)); goto error_out; } -- 2.30.2